package com.datasure.demo.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiaolong5.zhang
 * @date 2022/04/04 12:23
 **/
@RestController
public class CloudController {

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }


    @GetMapping("/beybey")
    @PreAuthorize("hasAnyRole('first')")
    public String beybey(){
        return "beybey";
    }
}
